#ifndef ITEMDELEGATE_H
#define ITEMDELEGATE_H

#include <QObject>
#include <QStyledItemDelegate>
#include <QPainter>
#include <QStyleOptionViewItem>

class ItemDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    explicit ItemDelegate(QObject *parent = nullptr);
    ItemDelegate(int type, QObject * parent=nullptr);
    void paint(QPainter * painter,
               const QStyleOptionViewItem & option,
               const QModelIndex & index) const;


signals:

public slots:

private:
    int     m_type;//type=0: header    type=1：content
};




#endif // ITEMDELEGATE_H
